<div id="content">
  <div class="row s_page_title">
    <sa-big-breadcrumbs
      [items]="['安装管理[环卫]', '设备维修日报', '日报详情']"
      icon="fa fa-newspaper-o"
      class="col-xs-12 col-sm-7 col-md-7 col-lg-4"
    ></sa-big-breadcrumbs>
  </div>
  <div class="s_page_wrap" style="position: relative">
    <div class="row" style="margin-top: 5px">
      <button class="btn btn-link" (click)="goBack()" style="position: absolute; right: -4px; top: -3px; left: initial">
        >>返回维修日报
      </button>
      <div class="col-xs-12" *ngIf="dailyDetail">
        <div class="model">
          <div class="title first-title">基本信息</div>
          <div class="content">
            <div>
              <div class="title"></div>
              <div class="item">
                <span class="item-key">项目名称：</span>
                <span class="item-val">{{ dailyDetail.projectName }}</span>
              </div>
              <div class="item">
                <span class="item-key">时间：</span>
                <span class="item-val">{{ dailyDetail.reportDate }}</span>
              </div>
              <div class="item">
                <span class="item-key">录入人员：</span>
                <span class="item-val">{{ dailyDetail.userName }}</span>
              </div>
            </div>
          </div>
        </div>
        <div class="catalog">
          <p class="catalog-title">装车</p>
          <div class="model" *ngIf="dailyDetail.liveSituation">
            <div class="title first-title">现场情况</div>
            <div class="content">
              <div>
                <div class="title-s">客户车辆</div>
                <div>
                  <div class="item">
                    <span class="item-key">计划车辆：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.planCount }}</span>
                  </div>
                  <div class="item">
                    <span class="item-key">车辆计划到场时间：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.planDate }}</span>
                  </div>
                  <div class="item">
                    <span class="item-key">人员到场时间：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.personnelDate }}</span>
                  </div>
                </div>
                <div>
                  <div class="item">
                    <span class="item-key">实到车辆：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.realCount }}</span>
                  </div>
                  <div class="item">
                    <span class="item-key">车辆实际到场时间：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.realDate }}</span>
                  </div>
                </div>
                <div class="title-s">物料工具</div>
                <div>
                  <div class="item">
                    <span class="item-key">缺物料：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.materialsNotAvailable }}</span>
                  </div>
                  <div class="item">
                    <span class="item-key">物料丢失：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.materialsLost }}</span>
                  </div>
                </div>
                <div>
                  <div class="item">
                    <span class="item-key">工具损坏：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.toolDamage }}</span>
                  </div>
                  <div class="item">
                    <span class="item-key">工具丢失：</span>
                    <span class="item-val">{{ dailyDetail.liveSituation.toolLost }}</span>
                  </div>
                </div>
                <div class="title-s">天气其他</div>
                <div class="item">
                  <span class="item-key">天气：</span>
                  <span class="item-val">{{ dailyDetail.liveSituation.weather }}</span>
                </div>
                <div class="item">
                  <span class="item-key">其他情况：</span>
                  <span class="item-val">{{ dailyDetail.liveSituation.liveOtherCases }}</span>
                </div>
              </div>
            </div>
          </div>
          <div class="model" *ngIf="dailyDetail.personnelSituation">
            <div class="title first-title">人员情况</div>
            <div class="content">
              <div>
                <div class="title"></div>
                <div>
                  <div class="item">
                    <span class="item-key">到场人员：</span>
                    <span class="item-val">{{ dailyDetail.personnelSituation.personCount }}</span>
                  </div>
                </div>
                <div>
                  <div class="item">
                    <span class="item-key">公司人员：</span>
                    <span class="item-val">{{ dailyDetail.personnelSituation.companyUser }}</span>
                  </div>
                  <div class="item" *ngFor="let item of dailyDetail.personnelSituation.companyUserInfo">
                    <span class="item-key" *ngIf="item.type == '1'">焊接人员：</span>
                    <span class="item-key" *ngIf="item.type == '2'">接电人员：</span>
                    <span class="item-val">{{ item.name }}</span>
                    <span *ngIf="item.paperwork == '1'">有证</span>
                    <span *ngIf="item.paperwork == '2'">无证</span>
                  </div>
                </div>
                <div>
                  <div class="item">
                    <span class="item-key">临时人员：</span>
                    <span class="item-val">{{ dailyDetail.personnelSituation.interimUser }}</span>
                  </div>
                  <div class="item" *ngFor="let item of dailyDetail.personnelSituation.companyInterimInfo">
                    <span class="item-key" *ngIf="item.type == '1'">焊接人员：</span>
                    <span class="item-key" *ngIf="item.type == '2'">接电人员：</span>
                    <span class="item-val">{{ item.name }}</span>
                    <span *ngIf="item.paperwork == '1'">有证</span>
                    <span *ngIf="item.paperwork == '2'">无证</span>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="model" *ngIf="dailyDetail.installedSituation">
            <div class="title first-title">安装情况</div>
            <div class="content">
              <div class="model-left">
                <div class="title"></div>
                <div class="item">
                  <span class="item-key"></span>
                  <span class="item-val" style="font-weight: bold">数量</span>
                  <span class="item-val" style="font-weight: bold">备注</span>
                </div>
                <div class="item">
                  <span class="item-key">主机：</span>
                  <span class="item-val">{{ dailyDetail.installedSituation.hostCount }}</span>
                  <span class="item-remark">{{ dailyDetail.installedSituation.hostRemark }}</span>
                </div>
                <div class="item">
                  <span class="item-key">走线：</span>
                  <span class="item-val">{{ dailyDetail.installedSituation.tracesCount }}</span>
                  <span class="item-remark">{{ dailyDetail.installedSituation.tracesRemark }}</span>
                </div>
                <div class="item">
                  <span class="item-key">接近开关：</span>
                  <span class="item-val">{{ dailyDetail.installedSituation.switchCount }}</span>
                  <span class="item-remark">{{ dailyDetail.installedSituation.switchRemark }}</span>
                </div>
              </div>
              <div class="model-right">
                <div class="title"></div>
                <div class="item">
                  <span class="item-key"></span>
                  <span class="item-val" style="font-weight: bold">数量</span>
                  <span class="item-remark" style="font-weight: bold">备注</span>
                </div>
                <div class="item">
                  <span class="item-key">铁板+传感器：</span>
                  <span class="item-val">{{ dailyDetail.installedSituation.sensorCount }}</span>
                  <span class="item-remark">{{ dailyDetail.installedSituation.sensorRemark }}</span>
                </div>
                <div class="item">
                  <span class="item-key">读卡器：</span>
                  <span class="item-val">{{ dailyDetail.installedSituation.cardCount }}</span>
                  <span class="item-remark">{{ dailyDetail.installedSituation.cardRemark }}</span>
                </div>
                <div class="item">
                  <span class="item-key">显示器：</span>
                  <span class="item-val">{{ dailyDetail.installedSituation.screenCount }}</span>
                  <span class="item-remark">{{ dailyDetail.installedSituation.screenRemark }}</span>
                </div>
              </div>
              <div style="border-top: 1px solid #ccc; margin-top: 10px; padding-top: 8px">
                <div class="item">
                  <span class="item-key">其他情况：</span>
                  <span class="item-val">{{ dailyDetail.installedSituation.installedOtherCases }}</span>
                </div>
              </div>
            </div>
          </div>
          <div class="model" *ngIf="dailyDetail.calibrationSituation">
            <div class="title first-title">标定验证</div>
            <div class="content">
              <div>
                <div class="title"></div>
                <div class="item">
                  <span class="item-key">标定：</span>
                  <span class="item-val">{{ dailyDetail.calibrationSituation.calibrationCount }}</span>
                  <span>{{ dailyDetail.calibrationSituation.calibrationRemark }}</span>
                </div>
                <div class="item">
                  <span class="item-key">验证：</span>
                  <span class="item-val">{{ dailyDetail.calibrationSituation.verifyCount }}</span>
                  <span>{{ dailyDetail.calibrationSituation.verifyRemark }}</span>
                </div>
                <div class="item">
                  <span class="item-key">其他情况：</span>
                  <span class="item-val">{{ dailyDetail.calibrationSituation.calibrationOtherCase }}</span>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="catalog">
          <p class="catalog-title">维修</p>
          <div class="model" *ngIf="dailyDetail.repairedSituation">
            <div class="title first-title">维修情况</div>
            <div class="content">
              <div class="item">
                <span class="item-key">维修数量：</span>
                <span class="item-val">{{ dailyDetail.repairedSituation.repairedCount }}</span>
              </div>
              <div class="item">
                <span class="item-key">掉桶次数：</span>
                <span class="item-val">{{ dailyDetail.repairedSituation.bucketCount }}</span>
              </div>
              <div class="item">
                <span class="item-key">不准次数：</span>
                <span class="item-val">{{ dailyDetail.repairedSituation.inaccurate }}</span>
              </div>
              <div class="item line-feed">
                <span class="item-key">维修车辆：</span>
                <span class="item-val">
                  {{
                    dailyDetail.repairedSituation.carNumberList && dailyDetail.repairedSituation.carNumberList.join(',')
                  }}
                </span>
              </div>
              <div class="item line-feed">
                <span class="item-key">故障类型：</span>
                <span class="item-val">
                  {{
                    dailyDetail.repairedSituation.faultTypeList && dailyDetail.repairedSituation.faultTypeList.join(',')
                  }}
                </span>
              </div>
            </div>
          </div>
        </div>
        <div class="catalog">
          <p class="catalog-title">未安装/维修原因</p>
          <div class="model" *ngIf="dailyDetail.unloadOrRepairedCause">
            <div class="title first-title">详细情况</div>
            <div class="content">
              <div class="item line-feed">
                <span class="item-key">具体情况：</span>
                <span class="item-val">
                  {{ dailyDetail.unloadOrRepairedCause && dailyDetail.unloadOrRepairedCause.causeTypeName }}
                </span>
              </div>
              <div class="item line-feed">
                <span class="item-key">详细描述：</span>
                <span class="item-val">
                  {{ dailyDetail.unloadOrRepairedCause && dailyDetail.unloadOrRepairedCause.causeRemark }}
                </span>
              </div>
            </div>
          </div>
        </div>
        <div class="hr hr-dotted"></div>
      </div>
    </div>
  </div>
</div>
